#while循环嵌套
#打印小星星
"""
i =1
while i <= 5:
    print("* "*i)
    i += 1
"""
'''
row = 1
while row <= 5:
    col = 1
    while col <= row:
        print("*", end=' ')
        col += 1
    print() #手动换行
    row += 1
'''

#打印九九乘法表
#1）把上列5行的五角星变成9行：
#2）把结果中的*编程乘法表达式即可
#3）表达式转换，格式化输出

row = 1
while row <= 9:
    col = 1
    while col <= row:
        print("%d*%d =%d" %(col,row,row*col), end='\t')
        col += 1
    print() #手动换行
    row += 1
